/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 34255
 * Date: 2024-05-14
 * Time: 21:16
 */
public class Dog extends Animal{//子类/派生类

    public Dog(String name, int age, String gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                '}';
    }

    public void wangWang(){
        System.out.println(name + " 正在汪汪叫!");
    }
}
